package com.fowo.api.model.purchase.plans;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.validator.EnumsString;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 采购计划 导入导出辅助模型 */
@Getter
@Setter
public class PurchasePlansExcelPo {

  @Size(max = 50, message = "创建批次号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "创建批次号")
  private String ppgSn;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "计划采购量")
  private String quantityPlan;

  @Size(max = 50, message = "批次备注长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "批次备注")
  private String remark;

  @EnumsString(
    value = { "待采购", "已完成", "已驳回", "已作废", "待审批", "待提交" },
    message = "状态的可用值为 “待采购”, “已完成”, “已驳回”, “已作废”, “待审批”, “待提交” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "状态")
  private String status;

  @ExcelProperty(value = "已采购数量")
  private Long quantityPurchased;

  @Size(max = 50, message = "创建人长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "创建人")
  private String createNameName;

  @ExcelIgnore
  @ExcelProperty(value = "创建人")
  private Long createName;

  @Size(max = 50, message = "创建人长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "创建人")
  private String createName2;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "采购仓库")
  private String purchaseWarePurchaseOrderCode;

  @ExcelIgnore
  @ExcelProperty(value = "采购仓库")
  private Long purchaseWare;
}
